<?php
class Zend_View_Helper_FlashMessages extends Zend_View_Helper_Abstract
{
	public function flashMessages()
	{
		$messages = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger')->getMessages();
		$output = '';
		 
		if (!empty($messages)) {
			
			foreach ($messages as $message) {
				$output .= '<div id="message-green">';
				$output .= '<table border="0" width="100%" cellpadding="0" cellspacing="0">
							<tr>
							<td class="'.key($message).'-left">' . current($message) . '</td>
							<td class="'.key($message).'-right"><a class="close-'.key($message).'"><img src="/zfMHB/public/images/table/icon_close_'.key($message).'.gif"   alt="" /></a></td>
							</tr>
							</table>';
				$output .= '</div>';
			}			
		}		
		return $output;
	}
}